import bb.cascades 1.2
import "../lib"
import bb.WebImageView 1.4

Padding {
    property alias title: m_title.text
    property alias thumbnail: m_thumbnail.url
    property int screenWidth

    layout: StackLayout {
        orientation: LayoutOrientation.TopToBottom
    }
    
    Divider {
        opacity: 0.0
        topMargin: 0
        bottomMargin: 0
    }
    
    Common {
        id: com
    }
    
    Container {
        layout: AbsoluteLayout {
        }
        
        Container {
            WebImageView {
                id: m_thumbnail
                scalingMethod: ScalingMethod.AspectFill
                preferredWidth: 134*1.5
                preferredHeight: 96*1.5
            }
        }
        
        Container {
            preferredWidth: screenWidth- 134*1.5 - 10
            layoutProperties: AbsoluteLayoutProperties {
                positionX: 134*1.5 + 10
            }
            
            Label {
                id: m_title
                multiline: true
                textStyle.base: com.titleStyle
            }
        }
    }
}
